extends Node2D

var map_node = {
	
}
# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	GlobaWeb.get_user.rpc_id(1,Global.user_name,multiplayer.get_unique_id())
	GlobaWeb.get_map_user.rpc_id(1,"测试地图",multiplayer.get_unique_id())
	
	
	for key in Global.map_user:
		if map_node.has( Global.map_user[key].name):
			map_node[Global.map_user[key].name].global_position = PositionUtil.string_to_vec2i(Global.map_user[key].position)
			map_node[Global.map_user[key].name].user = Global.map_user[key]
			pass
		else:
			map_node[Global.map_user[key].name] = preload("res://client/game/role/role.tscn").instantiate()
			add_child(map_node[Global.map_user[key].name])
	pass
